<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<form>
    <table border="1">
        <a th:href="@{/user/toadd}">添加</a>
        <tr>
            <td>编号</td>
            <td>姓名</td>
            <td>性别</td>
            <td>密码</td>
            <td>年龄</td>
            <td>手机号</td>
            <td>操作</td>
        </tr>
        <tr th:each="user:${list.getRecords()}">
            <td th:text="${user.getId()}">编号</td>
            <td th:text="${user.getName()}">姓名</td>
            <td th:text="${user.getGender()}">性别</td>
            <td th:text="${user.getPassword()}">密码</td>
            <td th:text="${user.getAge()}">年龄</td>
            <td th:text="${user.getTel}">手机号</td>
            <td>
                <a th:href="@{/user/findById(id=${user.getId()})}">修改</a>
                <a th:href="@{/user/del(id=${user.getId()})}">删除</a>
            </td>
        </tr>
    </table>
    <!--mybatipuls方法-->
    <a href=" ">首页</a>
    <a th:href="@{/user/findAll(pageNum=${list.getCurrent()-1})}">上一页</a>
    <a th:href="@{/user/findAll(pageNum=${list.getCurrent()+1})}">下一页</a>
    <a th:href="@{/user/findAll(pageNum=${list.getPages()})}">尾页</a>
</form>
</body>
</html>